package com.tiancheng.trade.order.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Auther: liudong
 * @Date: 2024/4/20 11:15
 * @Param ${tags}
 * @Description:
 */
@Getter
@AllArgsConstructor
public enum CouponTypeEnum {
	FULL_REDUCTION("1", "满减券"),
	DISCOUNT("2", "抵扣券"),
	INCREASE("3", "增长券");

	private String code;
	private String desc;

	public static String getDesc(String code) {
		CouponTypeEnum[] couponTypeEnums = values();
		for (CouponTypeEnum statusEnum : couponTypeEnums) {
			if (statusEnum.code().equals(code)) {
				return statusEnum.desc();
			}
		}
		return null;
	}

	public String code() {
		return this.code;
	}

	public String desc() {
		return this.desc;
	}
}
